// home页的小仓库
import {reqCategoryList} from '@/api'
const state = {
    categortList:[]
}

const mutations = {
    CATEGORYLIST(state,categortList) {
        state.categortList = categortList
    }
}

const actions = {
   async categoryList({commit}) {
        let res =  await reqCategoryList()
        if (res.code == 200) {
            commit('CATEGORYLIST',res.data)
        }
        
    }
}

const getters = {}

export default {
    state,
    mutations,
    actions,
    getters
}